<template>
  <view class="homeMain">
    <!-- banner图 -->
    <!-- #ifdef H5-->
    <!-- <u-swiper
      :list="list"
      height="420"
      mode="none"
      border-radius="0"
      img-mode="widthFix"
    ></u-swiper> -->
    <!-- #endif -->
    <!-- #ifdef MP-WEIXIN -->
    <!-- #endif -->
    <!-- #ifdef APP-PLUS -->
    <!-- #endif -->
    <!-- <view class="charts-box"><qiun-data-charts v-if="qdCharts" type="ring" :opts="opts2" :chartData="channelStatsData" /></view> -->
    <u-back-top :scroll-top="scrollTop"></u-back-top>
    <u-top-tips ref="uTips"></u-top-tips>
    <toast></toast>
  </view>
</template>
<script>
let random = parseInt(Date.now() / 10000)
let colors = ['#91CB74', '#1890FF', '#FAC858', '#ea7ccc', '#EE6666']
export default {
  data() {
    return {
      scrollTop: 0,
      qdCharts: false,
      //banner
      // list: [
      //   {
      //     image:
      //       "https://apiylk.gtxgzs.com/Public/assets/images/hsb/imgBanner.jpg?" +
      //       random,
      //   },
      //   {
      //     image:
      //       "https://apiylk.gtxgzs.com/Public/assets/images/hsb/imgBanner.jpg?" +
      //       random,
      //   },
      // ],
      // 环形图
      opts2: {
        rotate: false,
        rotateLock: false,
        color: colors,
        padding: [0, 20, 0, 20],
        dataLabel: true,
        legend: {
          show: true,
          position: 'right',
          lineHeight: 25,
        },
        title: {
          name: '',
        },
        subtitle: {
          name: '',
        },
        extra: {
          ring: {
            ringWidth: 40,
            activeOpacity: 0.5,
            activeRadius: 10,
            offsetAngle: 0,
            labelWidth: 15,
            border: true,
            borderWidth: 3,
            borderColor: '#FFFFFF',
          },
        },
      },
      channelStatsData: {
        series: [
          {
            data: [
              { name: '渠道', value: 30 },
              { name: '渠道', value: 30 },
              { name: '渠道', value: 30 },
            ],
          },
        ],
      },
    }
  },
  onLoad() {},
  onShow() {},
  onPullDownRefresh() {},
  onShareAppMessage() {},
  methods: {
    /* 顶部提示文字 */
    uTips(title, type = 'warning', duration = 1500) {
      this.$refs.uTips.show({
        title: title,
        type: type,
        duration: duration,
      })
    },
    /* 返回顶部 */
    onPageScroll(e) {
      this.scrollTop = e.scrollTop
    },
  },
}
</script>
<style lang="scss" scoped>
page {
  background: #fff;
  padding-bottom: 120rpx;
}
//echart图表
.charts-box {
  width: 100%;
  height: 500rpx;
  box-sizing: content-box;
  margin-top: -40rpx;
}
</style>
